<?php
/**
 * Created by DreamPHP.
 * User: Leruge
 * Date: 2018/4/10 0010
 * Time: 03:10
 * Email: leruge@163.com
 * Url: http://www.dreamphp.com.cn/
 */

namespace app\common\validate;

use think\Validate;

class Video extends Validate
{
    protected $rule = [
        'title|视频标题' => 'require|unique:video',
        'sort|排序' => 'require'
    ];

    public function sceneAdd()
    {
        return $this->only(['title', 'sort']);
    }

    public function sceneEdit()
    {
        return $this->only(['title']);
    }
}